package com.xca.znb.presenter;

import com.xca.znb.entity.Goods;
import com.xca.znb.entity.User;
import com.xca.znb.model.imodel.IEndPay;

public class EndPayPresenter {
    private IEndPay iEndPay ;
    public EndPayPresenter(IEndPay iEndPay){
        this.iEndPay = iEndPay ;
    }

    public boolean addOrder(int localId , int goodsId , int num , String remark , String buyer ,
                            String sales , String type , String time){
        return iEndPay.addOrder(localId, goodsId, num, remark, buyer, sales, type, time);
    }

    public Goods getGoodsById(int id){
        return iEndPay.getGoodsById(id);
    }
    public double getBalance(String phone){
        return iEndPay.getBalance(phone);
    }
    public User getUserByPhone(String phone){
        return iEndPay.getUserByPhone(phone);
    }
    public void  insertAccount(String phone , double num , String type , String time_day , String time_sec){
        iEndPay.insertAccount(phone, num, type, time_day, time_sec);
    }
}
